/*
 * Copyright (c) 2007 Compl Yue Still, All Rights Reserved.
 */

package oex.tasks
{
	import hbi.domain.Gateway;
	import hbi.task.TaskAgent;
	
	import oex.ObjectExplorer;
	import oex.ui.ObjectShape;

	public class ShapeApproval implements TaskAgent
	{
		
		private var explorer:ObjectExplorer;
		
		public function arrived(gateway:Gateway):void
		{
			explorer = ObjectExplorer(gateway.localDomain);
		}
		
		public function newShapeApproved(tempOID:int, assignedOID:int):void
		{
			explorer.newShapeApproved(tempOID, assignedOID);
		}
		
		public function shapeUpdateApproved(oid:int):void
		{
			var shape:ObjectShape = explorer.prepareShape(oid);
			if(shape) shape.redrawShape(0.8);
		}
		
		public function shapeRemovalApproved(oid:int):void
		{
			explorer.shapeRemoved(oid);
		}
		
		public function finishTask(gateway:Gateway):void
		{
		}
		
	}
}
